<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <!--    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no 20" http-equiv="refresh">-->
    <title>CAD画图</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    {% block styles %}
    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
    {% endblock %}
    <script>
        function reloadPage() {
            location.reload()
        }
    </script>
</head>
<body>


<br>


<div class="container-fluid">


    <div class="row">

        <div class="col-md-1">
            <h5 class="col-md-1 offset-md-11">CAD文件生成</h5>


        </div>

        <div class="col-md-2 offset-md-1">
            <form method="post" enctype="multipart/form-data">
                {{ form1.csrf_token }}
                {{ form1.code.label }}<br>
                {{ form1.code(class='form-control')}}
                {% if form1.code.errors %}
                {% for message in form1.code.errors %}
                <small class="error" style="color: red">{{ message }}</small><br>
                {% endfor %}
                {% endif %}

                {{ form1.length.label }}<br>
                {{ form1.length(class='form-control')}}
                {% if form1.length.errors %}
                {% for message in form1.length.errors %}
                <small class="error" style="color: red">{{ message }}</small><br>
                {% endfor %}
                {% endif %}

                {{ form1.width.label }}<br>
                {{ form1.width(class='form-control')}}
                {% if form1.width.errors %}
                {% for message in form1.width.errors %}
                <small class="error" style="color: red">{{ message }}</small><br>
                {% endfor %}
                {% endif %}
                <br>

                {{ form1.submit1(class='btn btn-success btn-primary btn-block' )}}<br>
                {% if form1.submit1.data %}
                {% endif %}


                <a href="{{ url_for('cal') }}">--->>> 数 据 刷 新 --->>></a><br>


                <br>
            </form>
        </div>

        <div class="col-md-2 offset-md-1">
            <form method="post" enctype="multipart/form-data">
                {{ form2.csrf_token }}
                <p>镜面直径：{{ LES }}</p>
                <p>基板代码：{{ code }}</p>
                <p>芯片尺寸：{{ length }}x{{width}}</p>

                {{ form2.serial_number.label }}<br>
                {{ form2.serial_number(class='form-control')}}
                {% if form2.serial_number.errors %}
                {% for message in form2.serial_number.errors %}
                <small class="error" style="color: red">{{ message }}</small><br>
                {% endfor %}
                {% endif %}

                {{ form2.union_number.label }}<br>
                {{ form2.union_number(class='form-control')}}
                {% if form2.union_number.errors %}
                {% for message in form2.union_number.errors %}
                <small class="error" style="color: red">{{ message }}</small><br>
                {% endfor %}
                {% endif %}


                {{ form2.deviate.label }}<br>
                {{ form2.deviate(class='form-control')}}
                {% if form2.deviate.errors %}
                {% for message in form2.deviate.errors %}
                <small class="error" style="color: red">{{ message }}</small><br>
                {% endfor %}
                {% endif %}

                {{ form2.interval.label }}<br>
                {{ form2.interval(class='form-control')}}
                {% if form2.interval.errors %}
                {% for message in form2.interval.errors %}
                <small class="error" style="color: red">{{ message }}</small><br>
                {% endfor %}
                {% endif %}

                <br>

                {{ form2.submit2(class='btn btn-success btn-primary btn-block' )}}<br>
                <a href="{{ url_for('cal') }}">--->>> 数 据 刷 新 --->>></a><br>
                <p>提示：</p>

                {% for message in get_flashed_messages() %}
                <p class="error" style="color: red">{{ message }}</p><br>

                {% endfor %}


                <br>
            </form>
        </div>

        <div class="col-md-2 offset-md-1">
            <form method="post" enctype="multipart/form-data">
                {{ form3.csrf_token }}
                <p>并数:{{union_number}}   串数:{{serial_number}}</p>
                <p>最小偏移:{{deviate}}    最小间隔:{{interval}}</p>
                {% if dict1 %}
                    <p>情况1数量：{{ num1 }}</p>
                    <p>情况1：{{ dict1 }}</p>
                {% else %}
                    <p>情况1极限数量：{{ num1 }};芯片数量已超出</p>
                {% endif %}
                {% if dict2 %}
                    <p>情况2数量：{{ num2 }}</p>
                    <p>情况2：{{ dict2 }}</p>
                {%else%}
                    <p>情况2极限数量：{{ num2 }};芯片数量已超出</p>
                {%endif%}
                {{ form3.choice.label }}<br>
                {% for subfield in form3.choice %}
                    <td>{{ subfield }}</td>
                    <td>{{ subfield.label }}</td><br>
                {% endfor %}
                {% if form3.choice.errors %}
                    {% for message in form3.choice.errors %}
                        <small class="error" style="color: red">{{ message }}</small><br>
                    {% endfor %}
                {% endif %}
                <br>

                {{ form3.submit3(class='btn btn-success btn-primary btn-block' )}}<br>
                {% if form3.submit3.data %}
                {% endif %}


                <a href="{{ url_for('cal') }}">--->>> 数 据 刷 新 --->>></a><br>


                <br>
            </form>
        </div>


    </div>
</div>
</body>


</html>


